INC_PATH = -I ./ -I ./inc -I ./kit -I ./ext -I ./qmath
LIB_DIR =
STATIC_LIBS = 
LIBS = -lpthread -lrt -ldl $(STATIC_LIBS)

DBG_FLAGS = -g
#DBG_FLAGS = 
NOWALL_FLAGS = -Wno-unused-result -Wno-unused-function -Wno-unused-variable -Wno-reorder -Wno-unused-value -Wno-unused-but-set-variable -Wno-switch -Wno-maybe-uninitialized
CXXFLAGS = -Wall $(NOWALL_FLAGS) -O2 $(DBG_FLAGS) -fpermissive -std=c++11 $(INC_PATH) -fPIC
LDXXFLAGS = $(LIBS)

EXE = mykit
GCC = g++
SUBDIR = .
CPP_SOURCES = $(foreach dir, $(SUBDIR), $(wildcard $(dir)/*.cpp))
CPP_OBJECTS = $(patsubst %.cpp, %.o, $(CPP_SOURCES))

$(EXE): $(CPP_OBJECTS)
	$(GCC) $(CPP_OBJECTS) -o $@ $(LIBS)

%.o: %.cpp
	$(GCC) -c $(CXXFLAGS) $< -o $@

clean:
	rm -rf $(CPP_OBJECTS) $(EXE)